package com.app.util.db.bean;

import java.util.LinkedHashSet;
import java.util.Set;

import com.app.util.db.util.SqlNameTranser;
import com.app.util.string.StringUtil;

public class GroupBy {

	private Set<String> groupItems = new LinkedHashSet<String>();

	public void addOrderItem(String groupItem) {
		groupItems.add(groupItem);
	}

	public String toString() {
		StringBuffer sb = new StringBuffer("GROUP BY ");
		sb.append(StringUtil.linkString(groupItems, ",", SqlNameTranser.IT));
		return sb.toString();
	}
} 